Proper connect_port
[juce-lv2.git] / juce / source / extras / browser plugins / wrapper / npapi / jni.h
blob8ffe6fa6e3bb005b02340e96998280969fd929f9
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
14 * The Original Code is the Java Runtime Interface.
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation and Sun Microsystems, Inc.
18 * Portions created by the Initial Developer are Copyright (C) 1993-1996
19 * the Initial Developer. All Rights Reserved.
21 * Contributor(s):
23 * Alternatively, the contents of this file may be used under the terms of
24 * either the GNU General Public License Version 2 or later (the "GPL"), or
25 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
26 * in which case the provisions of the GPL or the LGPL are applicable instead
27 * of those above. If you wish to allow use of your version of this file only
28 * under the terms of either the GPL or the LGPL, and not to allow others to
29 * use your version of this file under the terms of the MPL, indicate your
30 * decision by deleting the provisions above and replace them with the notice
31 * and other provisions required by the GPL or the LGPL. If you do not delete
32 * the provisions above, a recipient may use your version of this file under
33 * the terms of any one of the MPL, the GPL or the LGPL.
35 * ***** END LICENSE BLOCK ***** */
37 #ifndef JNI_H
38 #define JNI_H
40 #include <stdio.h>
41 #include <stdarg.h>
43 /* jni_md.h contains the machine-dependent typedefs for jbyte, jint
44 and jlong */
46 #include "jni_md.h"
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
53 * JNI Types
56 typedef unsigned char jboolean;
57 typedef unsigned short jchar;
58 typedef short jshort;
59 typedef float jfloat;
60 typedef double jdouble;
62 typedef jint jsize;
64 #ifdef __cplusplus
66 class _jobject {};
67 class _jclass : public _jobject {};
68 class _jthrowable : public _jobject {};
69 class _jstring : public _jobject {};
70 class _jarray : public _jobject {};
71 class _jbooleanArray : public _jarray {};
72 class _jbyteArray : public _jarray {};
73 class _jcharArray : public _jarray {};
74 class _jshortArray : public _jarray {};
75 class _jintArray : public _jarray {};
76 class _jlongArray : public _jarray {};
77 class _jfloatArray : public _jarray {};
78 class _jdoubleArray : public _jarray {};
79 class _jobjectArray : public _jarray {};
81 typedef _jobject *jobject;
82 typedef _jclass *jclass;
83 typedef _jthrowable *jthrowable;
84 typedef _jstring *jstring;
85 typedef _jarray *jarray;
86 typedef _jbooleanArray *jbooleanArray;
87 typedef _jbyteArray *jbyteArray;
88 typedef _jcharArray *jcharArray;
89 typedef _jshortArray *jshortArray;
90 typedef _jintArray *jintArray;
91 typedef _jlongArray *jlongArray;
92 typedef _jfloatArray *jfloatArray;
93 typedef _jdoubleArray *jdoubleArray;
94 typedef _jobjectArray *jobjectArray;
96 #else
98 struct _jobject;
100 typedef struct _jobject *jobject;
101 typedef jobject jclass;
102 typedef jobject jthrowable;
103 typedef jobject jstring;
104 typedef jobject jarray;
105 typedef jarray jbooleanArray;
106 typedef jarray jbyteArray;
107 typedef jarray jcharArray;
108 typedef jarray jshortArray;
109 typedef jarray jintArray;
110 typedef jarray jlongArray;
111 typedef jarray jfloatArray;
112 typedef jarray jdoubleArray;
113 typedef jarray jobjectArray;
115 #endif
117 typedef jobject jweak;
119 #if 0 /* moved to jri_md.h */
120 typedef jobject jref; /* For transition---not meant to be part of public
121 API anymore.*/
122 #endif
124 typedef union jvalue {
125 jboolean z;
126 jbyte b;
127 jchar c;
128 jshort s;
129 jint i;
130 jlong j;
131 jfloat f;
132 jdouble d;
133 jobject l;
134 } jvalue;
136 struct _jfieldID;
137 typedef struct _jfieldID *jfieldID;
139 struct _jmethodID;
140 typedef struct _jmethodID *jmethodID;
143 * jboolean constants
146 #define JNI_FALSE 0
147 #define JNI_TRUE 1
150 * possible return values for JNI functions.
153 #define JNI_OK 0 /* success */
154 #define JNI_ERR (-1) /* unknown error */
155 #define JNI_EDETACHED (-2) /* thread detached from the VM */
156 #define JNI_EVERSION (-3) /* JNI version error */
157 #define JNI_ENOMEM (-4) /* not enough memory */
158 #define JNI_EEXIST (-5) /* VM already created */
159 #define JNI_EINVAL (-6) /* invalid arguments */
162 * used in ReleaseScalarArrayElements
165 #define JNI_COMMIT 1
166 #define JNI_ABORT 2
169 * used in RegisterNatives to describe native method name, signature,
170 * and function pointer.
173 typedef struct {
174 char *name;
175 char *signature;
176 void *fnPtr;
177 } JNINativeMethod;
180 * JNI Native Method Interface.
183 struct JNINativeInterface_;
185 struct JNIEnv_;
187 #ifdef __cplusplus
188 typedef JNIEnv_ JNIEnv;
189 #else
190 typedef const struct JNINativeInterface_ *JNIEnv;
191 #endif
194 * JNI Invocation Interface.
197 struct JNIInvokeInterface_;
199 struct JavaVM_;
201 #ifdef __cplusplus
202 typedef JavaVM_ JavaVM;
203 #else
204 typedef const struct JNIInvokeInterface_ *JavaVM;
205 #endif
207 struct JNINativeInterface_ {
208 void *reserved0;
209 void *reserved1;
210 void *reserved2;
212 void *reserved3;
213 jint (JNICALL *GetVersion)(JNIEnv *env);
215 jclass (JNICALL *DefineClass)
216 (JNIEnv *env, const char *name, jobject loader, const jbyte *buf,
217 jsize len);
218 jclass (JNICALL *FindClass)
219 (JNIEnv *env, const char *name);
221 jmethodID (JNICALL *FromReflectedMethod)
222 (JNIEnv *env, jobject method);
223 jfieldID (JNICALL *FromReflectedField)
224 (JNIEnv *env, jobject field);
226 jobject (JNICALL *ToReflectedMethod)
227 (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
229 jclass (JNICALL *GetSuperclass)
230 (JNIEnv *env, jclass sub);
231 jboolean (JNICALL *IsAssignableFrom)
232 (JNIEnv *env, jclass sub, jclass sup);
234 jobject (JNICALL *ToReflectedField)
235 (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
237 jint (JNICALL *Throw)
238 (JNIEnv *env, jthrowable obj);
239 jint (JNICALL *ThrowNew)
240 (JNIEnv *env, jclass clazz, const char *msg);
241 jthrowable (JNICALL *ExceptionOccurred)
242 (JNIEnv *env);
243 void (JNICALL *ExceptionDescribe)
244 (JNIEnv *env);
245 void (JNICALL *ExceptionClear)
246 (JNIEnv *env);
247 void (JNICALL *FatalError)
248 (JNIEnv *env, const char *msg);
250 jint (JNICALL *PushLocalFrame)
251 (JNIEnv *env, jint capacity);
252 jobject (JNICALL *PopLocalFrame)
253 (JNIEnv *env, jobject result);
255 jobject (JNICALL *NewGlobalRef)
256 (JNIEnv *env, jobject lobj);
257 void (JNICALL *DeleteGlobalRef)
258 (JNIEnv *env, jobject gref);
259 void (JNICALL *DeleteLocalRef)
260 (JNIEnv *env, jobject obj);
261 jboolean (JNICALL *IsSameObject)
262 (JNIEnv *env, jobject obj1, jobject obj2);
263 jobject (JNICALL *NewLocalRef)
264 (JNIEnv *env, jobject ref);
265 jint (JNICALL *EnsureLocalCapacity)
266 (JNIEnv *env, jint capacity);
268 jobject (JNICALL *AllocObject)
269 (JNIEnv *env, jclass clazz);
270 jobject (JNICALL *NewObject)
271 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
272 jobject (JNICALL *NewObjectV)
273 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
274 jobject (JNICALL *NewObjectA)
275 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
277 jclass (JNICALL *GetObjectClass)
278 (JNIEnv *env, jobject obj);
279 jboolean (JNICALL *IsInstanceOf)
280 (JNIEnv *env, jobject obj, jclass clazz);
282 jmethodID (JNICALL *GetMethodID)
283 (JNIEnv *env, jclass clazz, const char *name, const char *sig);
285 jobject (JNICALL *CallObjectMethod)
286 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
287 jobject (JNICALL *CallObjectMethodV)
288 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
289 jobject (JNICALL *CallObjectMethodA)
290 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
292 jboolean (JNICALL *CallBooleanMethod)
293 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
294 jboolean (JNICALL *CallBooleanMethodV)
295 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
296 jboolean (JNICALL *CallBooleanMethodA)
297 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
299 jbyte (JNICALL *CallByteMethod)
300 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
301 jbyte (JNICALL *CallByteMethodV)
302 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
303 jbyte (JNICALL *CallByteMethodA)
304 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
306 jchar (JNICALL *CallCharMethod)
307 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
308 jchar (JNICALL *CallCharMethodV)
309 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
310 jchar (JNICALL *CallCharMethodA)
311 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
313 jshort (JNICALL *CallShortMethod)
314 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
315 jshort (JNICALL *CallShortMethodV)
316 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
317 jshort (JNICALL *CallShortMethodA)
318 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
320 jint (JNICALL *CallIntMethod)
321 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
322 jint (JNICALL *CallIntMethodV)
323 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
324 jint (JNICALL *CallIntMethodA)
325 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
327 jlong (JNICALL *CallLongMethod)
328 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
329 jlong (JNICALL *CallLongMethodV)
330 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
331 jlong (JNICALL *CallLongMethodA)
332 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
334 jfloat (JNICALL *CallFloatMethod)
335 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
336 jfloat (JNICALL *CallFloatMethodV)
337 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
338 jfloat (JNICALL *CallFloatMethodA)
339 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
341 jdouble (JNICALL *CallDoubleMethod)
342 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
343 jdouble (JNICALL *CallDoubleMethodV)
344 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
345 jdouble (JNICALL *CallDoubleMethodA)
346 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue *args);
348 void (JNICALL *CallVoidMethod)
349 (JNIEnv *env, jobject obj, jmethodID methodID, ...);
350 void (JNICALL *CallVoidMethodV)
351 (JNIEnv *env, jobject obj, jmethodID methodID, va_list args);
352 void (JNICALL *CallVoidMethodA)
353 (JNIEnv *env, jobject obj, jmethodID methodID, jvalue * args);
355 jobject (JNICALL *CallNonvirtualObjectMethod)
356 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
357 jobject (JNICALL *CallNonvirtualObjectMethodV)
358 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
359 va_list args);
360 jobject (JNICALL *CallNonvirtualObjectMethodA)
361 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
362 jvalue * args);
364 jboolean (JNICALL *CallNonvirtualBooleanMethod)
365 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
366 jboolean (JNICALL *CallNonvirtualBooleanMethodV)
367 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
368 va_list args);
369 jboolean (JNICALL *CallNonvirtualBooleanMethodA)
370 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
371 jvalue * args);
373 jbyte (JNICALL *CallNonvirtualByteMethod)
374 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
375 jbyte (JNICALL *CallNonvirtualByteMethodV)
376 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
377 va_list args);
378 jbyte (JNICALL *CallNonvirtualByteMethodA)
379 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
380 jvalue *args);
382 jchar (JNICALL *CallNonvirtualCharMethod)
383 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
384 jchar (JNICALL *CallNonvirtualCharMethodV)
385 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
386 va_list args);
387 jchar (JNICALL *CallNonvirtualCharMethodA)
388 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
389 jvalue *args);
391 jshort (JNICALL *CallNonvirtualShortMethod)
392 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
393 jshort (JNICALL *CallNonvirtualShortMethodV)
394 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
395 va_list args);
396 jshort (JNICALL *CallNonvirtualShortMethodA)
397 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
398 jvalue *args);
400 jint (JNICALL *CallNonvirtualIntMethod)
401 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
402 jint (JNICALL *CallNonvirtualIntMethodV)
403 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
404 va_list args);
405 jint (JNICALL *CallNonvirtualIntMethodA)
406 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
407 jvalue *args);
409 jlong (JNICALL *CallNonvirtualLongMethod)
410 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
411 jlong (JNICALL *CallNonvirtualLongMethodV)
412 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
413 va_list args);
414 jlong (JNICALL *CallNonvirtualLongMethodA)
415 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
416 jvalue *args);
418 jfloat (JNICALL *CallNonvirtualFloatMethod)
419 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
420 jfloat (JNICALL *CallNonvirtualFloatMethodV)
421 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
422 va_list args);
423 jfloat (JNICALL *CallNonvirtualFloatMethodA)
424 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
425 jvalue *args);
427 jdouble (JNICALL *CallNonvirtualDoubleMethod)
428 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
429 jdouble (JNICALL *CallNonvirtualDoubleMethodV)
430 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
431 va_list args);
432 jdouble (JNICALL *CallNonvirtualDoubleMethodA)
433 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
434 jvalue *args);
436 void (JNICALL *CallNonvirtualVoidMethod)
437 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...);
438 void (JNICALL *CallNonvirtualVoidMethodV)
439 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
440 va_list args);
441 void (JNICALL *CallNonvirtualVoidMethodA)
442 (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID,
443 jvalue * args);
445 jfieldID (JNICALL *GetFieldID)
446 (JNIEnv *env, jclass clazz, const char *name, const char *sig);
448 jobject (JNICALL *GetObjectField)
449 (JNIEnv *env, jobject obj, jfieldID fieldID);
450 jboolean (JNICALL *GetBooleanField)
451 (JNIEnv *env, jobject obj, jfieldID fieldID);
452 jbyte (JNICALL *GetByteField)
453 (JNIEnv *env, jobject obj, jfieldID fieldID);
454 jchar (JNICALL *GetCharField)
455 (JNIEnv *env, jobject obj, jfieldID fieldID);
456 jshort (JNICALL *GetShortField)
457 (JNIEnv *env, jobject obj, jfieldID fieldID);
458 jint (JNICALL *GetIntField)
459 (JNIEnv *env, jobject obj, jfieldID fieldID);
460 jlong (JNICALL *GetLongField)
461 (JNIEnv *env, jobject obj, jfieldID fieldID);
462 jfloat (JNICALL *GetFloatField)
463 (JNIEnv *env, jobject obj, jfieldID fieldID);
464 jdouble (JNICALL *GetDoubleField)
465 (JNIEnv *env, jobject obj, jfieldID fieldID);
467 void (JNICALL *SetObjectField)
468 (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val);
469 void (JNICALL *SetBooleanField)
470 (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val);
471 void (JNICALL *SetByteField)
472 (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val);
473 void (JNICALL *SetCharField)
474 (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val);
475 void (JNICALL *SetShortField)
476 (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val);
477 void (JNICALL *SetIntField)
478 (JNIEnv *env, jobject obj, jfieldID fieldID, jint val);
479 void (JNICALL *SetLongField)
480 (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val);
481 void (JNICALL *SetFloatField)
482 (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val);
483 void (JNICALL *SetDoubleField)
484 (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val);
486 jmethodID (JNICALL *GetStaticMethodID)
487 (JNIEnv *env, jclass clazz, const char *name, const char *sig);
489 jobject (JNICALL *CallStaticObjectMethod)
490 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
491 jobject (JNICALL *CallStaticObjectMethodV)
492 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
493 jobject (JNICALL *CallStaticObjectMethodA)
494 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
496 jboolean (JNICALL *CallStaticBooleanMethod)
497 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
498 jboolean (JNICALL *CallStaticBooleanMethodV)
499 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
500 jboolean (JNICALL *CallStaticBooleanMethodA)
501 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
503 jbyte (JNICALL *CallStaticByteMethod)
504 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
505 jbyte (JNICALL *CallStaticByteMethodV)
506 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
507 jbyte (JNICALL *CallStaticByteMethodA)
508 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
510 jchar (JNICALL *CallStaticCharMethod)
511 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
512 jchar (JNICALL *CallStaticCharMethodV)
513 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
514 jchar (JNICALL *CallStaticCharMethodA)
515 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
517 jshort (JNICALL *CallStaticShortMethod)
518 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
519 jshort (JNICALL *CallStaticShortMethodV)
520 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
521 jshort (JNICALL *CallStaticShortMethodA)
522 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
524 jint (JNICALL *CallStaticIntMethod)
525 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
526 jint (JNICALL *CallStaticIntMethodV)
527 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
528 jint (JNICALL *CallStaticIntMethodA)
529 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
531 jlong (JNICALL *CallStaticLongMethod)
532 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
533 jlong (JNICALL *CallStaticLongMethodV)
534 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
535 jlong (JNICALL *CallStaticLongMethodA)
536 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
538 jfloat (JNICALL *CallStaticFloatMethod)
539 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
540 jfloat (JNICALL *CallStaticFloatMethodV)
541 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
542 jfloat (JNICALL *CallStaticFloatMethodA)
543 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
545 jdouble (JNICALL *CallStaticDoubleMethod)
546 (JNIEnv *env, jclass clazz, jmethodID methodID, ...);
547 jdouble (JNICALL *CallStaticDoubleMethodV)
548 (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args);
549 jdouble (JNICALL *CallStaticDoubleMethodA)
550 (JNIEnv *env, jclass clazz, jmethodID methodID, jvalue *args);
552 void (JNICALL *CallStaticVoidMethod)
553 (JNIEnv *env, jclass cls, jmethodID methodID, ...);
554 void (JNICALL *CallStaticVoidMethodV)
555 (JNIEnv *env, jclass cls, jmethodID methodID, va_list args);
556 void (JNICALL *CallStaticVoidMethodA)
557 (JNIEnv *env, jclass cls, jmethodID methodID, jvalue * args);
559 jfieldID (JNICALL *GetStaticFieldID)
560 (JNIEnv *env, jclass clazz, const char *name, const char *sig);
561 jobject (JNICALL *GetStaticObjectField)
562 (JNIEnv *env, jclass clazz, jfieldID fieldID);
563 jboolean (JNICALL *GetStaticBooleanField)
564 (JNIEnv *env, jclass clazz, jfieldID fieldID);
565 jbyte (JNICALL *GetStaticByteField)
566 (JNIEnv *env, jclass clazz, jfieldID fieldID);
567 jchar (JNICALL *GetStaticCharField)
568 (JNIEnv *env, jclass clazz, jfieldID fieldID);
569 jshort (JNICALL *GetStaticShortField)
570 (JNIEnv *env, jclass clazz, jfieldID fieldID);
571 jint (JNICALL *GetStaticIntField)
572 (JNIEnv *env, jclass clazz, jfieldID fieldID);
573 jlong (JNICALL *GetStaticLongField)
574 (JNIEnv *env, jclass clazz, jfieldID fieldID);
575 jfloat (JNICALL *GetStaticFloatField)
576 (JNIEnv *env, jclass clazz, jfieldID fieldID);
577 jdouble (JNICALL *GetStaticDoubleField)
578 (JNIEnv *env, jclass clazz, jfieldID fieldID);
580 void (JNICALL *SetStaticObjectField)
581 (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value);
582 void (JNICALL *SetStaticBooleanField)
583 (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value);
584 void (JNICALL *SetStaticByteField)
585 (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value);
586 void (JNICALL *SetStaticCharField)
587 (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value);
588 void (JNICALL *SetStaticShortField)
589 (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value);
590 void (JNICALL *SetStaticIntField)
591 (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value);
592 void (JNICALL *SetStaticLongField)
593 (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value);
594 void (JNICALL *SetStaticFloatField)
595 (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value);
596 void (JNICALL *SetStaticDoubleField)
597 (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value);
599 jstring (JNICALL *NewString)
600 (JNIEnv *env, const jchar *unicode, jsize len);
601 jsize (JNICALL *GetStringLength)
602 (JNIEnv *env, jstring str);
603 const jchar *(JNICALL *GetStringChars)
604 (JNIEnv *env, jstring str, jboolean *isCopy);
605 void (JNICALL *ReleaseStringChars)
606 (JNIEnv *env, jstring str, const jchar *chars);
608 jstring (JNICALL *NewStringUTF)
609 (JNIEnv *env, const char *utf);
610 jsize (JNICALL *GetStringUTFLength)
611 (JNIEnv *env, jstring str);
612 const char* (JNICALL *GetStringUTFChars)
613 (JNIEnv *env, jstring str, jboolean *isCopy);
614 void (JNICALL *ReleaseStringUTFChars)
615 (JNIEnv *env, jstring str, const char* chars);
618 jsize (JNICALL *GetArrayLength)
619 (JNIEnv *env, jarray array);
621 jobjectArray (JNICALL *NewObjectArray)
622 (JNIEnv *env, jsize len, jclass clazz, jobject init);
623 jobject (JNICALL *GetObjectArrayElement)
624 (JNIEnv *env, jobjectArray array, jsize index);
625 void (JNICALL *SetObjectArrayElement)
626 (JNIEnv *env, jobjectArray array, jsize index, jobject val);
628 jbooleanArray (JNICALL *NewBooleanArray)
629 (JNIEnv *env, jsize len);
630 jbyteArray (JNICALL *NewByteArray)
631 (JNIEnv *env, jsize len);
632 jcharArray (JNICALL *NewCharArray)
633 (JNIEnv *env, jsize len);
634 jshortArray (JNICALL *NewShortArray)
635 (JNIEnv *env, jsize len);
636 jintArray (JNICALL *NewIntArray)
637 (JNIEnv *env, jsize len);
638 jlongArray (JNICALL *NewLongArray)
639 (JNIEnv *env, jsize len);
640 jfloatArray (JNICALL *NewFloatArray)
641 (JNIEnv *env, jsize len);
642 jdoubleArray (JNICALL *NewDoubleArray)
643 (JNIEnv *env, jsize len);
645 jboolean * (JNICALL *GetBooleanArrayElements)
646 (JNIEnv *env, jbooleanArray array, jboolean *isCopy);
647 jbyte * (JNICALL *GetByteArrayElements)
648 (JNIEnv *env, jbyteArray array, jboolean *isCopy);
649 jchar * (JNICALL *GetCharArrayElements)
650 (JNIEnv *env, jcharArray array, jboolean *isCopy);
651 jshort * (JNICALL *GetShortArrayElements)
652 (JNIEnv *env, jshortArray array, jboolean *isCopy);
653 jint * (JNICALL *GetIntArrayElements)
654 (JNIEnv *env, jintArray array, jboolean *isCopy);
655 jlong * (JNICALL *GetLongArrayElements)
656 (JNIEnv *env, jlongArray array, jboolean *isCopy);
657 jfloat * (JNICALL *GetFloatArrayElements)
658 (JNIEnv *env, jfloatArray array, jboolean *isCopy);
659 jdouble * (JNICALL *GetDoubleArrayElements)
660 (JNIEnv *env, jdoubleArray array, jboolean *isCopy);
662 void (JNICALL *ReleaseBooleanArrayElements)
663 (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode);
664 void (JNICALL *ReleaseByteArrayElements)
665 (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode);
666 void (JNICALL *ReleaseCharArrayElements)
667 (JNIEnv *env, jcharArray array, jchar *elems, jint mode);
668 void (JNICALL *ReleaseShortArrayElements)
669 (JNIEnv *env, jshortArray array, jshort *elems, jint mode);
670 void (JNICALL *ReleaseIntArrayElements)
671 (JNIEnv *env, jintArray array, jint *elems, jint mode);
672 void (JNICALL *ReleaseLongArrayElements)
673 (JNIEnv *env, jlongArray array, jlong *elems, jint mode);
674 void (JNICALL *ReleaseFloatArrayElements)
675 (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode);
676 void (JNICALL *ReleaseDoubleArrayElements)
677 (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode);
679 void (JNICALL *GetBooleanArrayRegion)
680 (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
681 void (JNICALL *GetByteArrayRegion)
682 (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
683 void (JNICALL *GetCharArrayRegion)
684 (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
685 void (JNICALL *GetShortArrayRegion)
686 (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
687 void (JNICALL *GetIntArrayRegion)
688 (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
689 void (JNICALL *GetLongArrayRegion)
690 (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
691 void (JNICALL *GetFloatArrayRegion)
692 (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
693 void (JNICALL *GetDoubleArrayRegion)
694 (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
696 void (JNICALL *SetBooleanArrayRegion)
697 (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf);
698 void (JNICALL *SetByteArrayRegion)
699 (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf);
700 void (JNICALL *SetCharArrayRegion)
701 (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf);
702 void (JNICALL *SetShortArrayRegion)
703 (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf);
704 void (JNICALL *SetIntArrayRegion)
705 (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf);
706 void (JNICALL *SetLongArrayRegion)
707 (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf);
708 void (JNICALL *SetFloatArrayRegion)
709 (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf);
710 void (JNICALL *SetDoubleArrayRegion)
711 (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf);
713 jint (JNICALL *RegisterNatives)
714 (JNIEnv *env, jclass clazz, const JNINativeMethod *methods,
715 jint nMethods);
716 jint (JNICALL *UnregisterNatives)
717 (JNIEnv *env, jclass clazz);
719 jint (JNICALL *MonitorEnter)
720 (JNIEnv *env, jobject obj);
721 jint (JNICALL *MonitorExit)
722 (JNIEnv *env, jobject obj);
724 jint (JNICALL *GetJavaVM)
725 (JNIEnv *env, JavaVM **vm);
727 void (JNICALL *GetStringRegion)
728 (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
729 void (JNICALL *GetStringUTFRegion)
730 (JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
732 void * (JNICALL *GetPrimitiveArrayCritical)
733 (JNIEnv *env, jarray array, jboolean *isCopy);
734 void (JNICALL *ReleasePrimitiveArrayCritical)
735 (JNIEnv *env, jarray array, void *carray, jint mode);
737 const jchar * (JNICALL *GetStringCritical)
738 (JNIEnv *env, jstring string, jboolean *isCopy);
739 void (JNICALL *ReleaseStringCritical)
740 (JNIEnv *env, jstring string, const jchar *cstring);
742 jweak (JNICALL *NewWeakGlobalRef)
743 (JNIEnv *env, jobject obj);
744 void (JNICALL *DeleteWeakGlobalRef)
745 (JNIEnv *env, jweak ref);
747 jboolean (JNICALL *ExceptionCheck)
748 (JNIEnv *env);
750 jobject (JNICALL *NewDirectByteBuffer)
751 (JNIEnv* env, void* address, jlong capacity);
752 void* (JNICALL *GetDirectBufferAddress)
753 (JNIEnv* env, jobject buf);
754 jlong (JNICALL *GetDirectBufferCapacity)
755 (JNIEnv* env, jobject buf);
759 * We use inlined functions for C++ so that programmers can write:
761 * env->FindClass("java/lang/String")
763 * in C++ rather than:
765 * (*env)->FindClass(env, "java/lang/String")
767 * in C.
770 struct JNIEnv_ {
771 const struct JNINativeInterface_ *functions;
772 #ifdef __cplusplus
774 jint GetVersion() {
775 return functions->GetVersion(this);
777 jclass DefineClass(const char *name, jobject loader, const jbyte *buf,
778 jsize len) {
779 return functions->DefineClass(this, name, loader, buf, len);
781 jclass FindClass(const char *name) {
782 return functions->FindClass(this, name);
784 jmethodID FromReflectedMethod(jobject method) {
785 return functions->FromReflectedMethod(this,method);
787 jfieldID FromReflectedField(jobject field) {
788 return functions->FromReflectedField(this,field);
791 jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) {
792 return functions->ToReflectedMethod(this, cls, methodID, isStatic);
795 jclass GetSuperclass(jclass sub) {
796 return functions->GetSuperclass(this, sub);
798 jboolean IsAssignableFrom(jclass sub, jclass sup) {
799 return functions->IsAssignableFrom(this, sub, sup);
802 jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) {
803 return functions->ToReflectedField(this,cls,fieldID,isStatic);
806 jint Throw(jthrowable obj) {
807 return functions->Throw(this, obj);
809 jint ThrowNew(jclass clazz, const char *msg) {
810 return functions->ThrowNew(this, clazz, msg);
812 jthrowable ExceptionOccurred() {
813 return functions->ExceptionOccurred(this);
815 void ExceptionDescribe() {
816 functions->ExceptionDescribe(this);
818 void ExceptionClear() {
819 functions->ExceptionClear(this);
821 void FatalError(const char *msg) {
822 functions->FatalError(this, msg);
825 jint PushLocalFrame(jint capacity) {
826 return functions->PushLocalFrame(this,capacity);
828 jobject PopLocalFrame(jobject result) {
829 return functions->PopLocalFrame(this,result);
832 jobject NewGlobalRef(jobject lobj) {
833 return functions->NewGlobalRef(this,lobj);
835 void DeleteGlobalRef(jobject gref) {
836 functions->DeleteGlobalRef(this,gref);
838 void DeleteLocalRef(jobject obj) {
839 functions->DeleteLocalRef(this, obj);
842 jboolean IsSameObject(jobject obj1, jobject obj2) {
843 return functions->IsSameObject(this,obj1,obj2);
846 jobject NewLocalRef(jobject ref) {
847 return functions->NewLocalRef(this,ref);
849 jint EnsureLocalCapacity(jint capacity) {
850 return functions->EnsureLocalCapacity(this,capacity);
853 jobject AllocObject(jclass clazz) {
854 return functions->AllocObject(this,clazz);
856 jobject NewObject(jclass clazz, jmethodID methodID, ...) {
857 va_list args;
858 jobject result;
859 va_start(args, methodID);
860 result = functions->NewObjectV(this,clazz,methodID,args);
861 va_end(args);
862 return result;
864 jobject NewObjectV(jclass clazz, jmethodID methodID,
865 va_list args) {
866 return functions->NewObjectV(this,clazz,methodID,args);
868 jobject NewObjectA(jclass clazz, jmethodID methodID,
869 jvalue *args) {
870 return functions->NewObjectA(this,clazz,methodID,args);
873 jclass GetObjectClass(jobject obj) {
874 return functions->GetObjectClass(this,obj);
876 jboolean IsInstanceOf(jobject obj, jclass clazz) {
877 return functions->IsInstanceOf(this,obj,clazz);
880 jmethodID GetMethodID(jclass clazz, const char *name,
881 const char *sig) {
882 return functions->GetMethodID(this,clazz,name,sig);
885 jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) {
886 va_list args;
887 jobject result;
888 va_start(args,methodID);
889 result = functions->CallObjectMethodV(this,obj,methodID,args);
890 va_end(args);
891 return result;
893 jobject CallObjectMethodV(jobject obj, jmethodID methodID,
894 va_list args) {
895 return functions->CallObjectMethodV(this,obj,methodID,args);
897 jobject CallObjectMethodA(jobject obj, jmethodID methodID,
898 jvalue * args) {
899 return functions->CallObjectMethodA(this,obj,methodID,args);
902 jboolean CallBooleanMethod(jobject obj,
903 jmethodID methodID, ...) {
904 va_list args;
905 jboolean result;
906 va_start(args,methodID);
907 result = functions->CallBooleanMethodV(this,obj,methodID,args);
908 va_end(args);
909 return result;
911 jboolean CallBooleanMethodV(jobject obj, jmethodID methodID,
912 va_list args) {
913 return functions->CallBooleanMethodV(this,obj,methodID,args);
915 jboolean CallBooleanMethodA(jobject obj, jmethodID methodID,
916 jvalue * args) {
917 return functions->CallBooleanMethodA(this,obj,methodID, args);
920 jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) {
921 va_list args;
922 jbyte result;
923 va_start(args,methodID);
924 result = functions->CallByteMethodV(this,obj,methodID,args);
925 va_end(args);
926 return result;
928 jbyte CallByteMethodV(jobject obj, jmethodID methodID,
929 va_list args) {
930 return functions->CallByteMethodV(this,obj,methodID,args);
932 jbyte CallByteMethodA(jobject obj, jmethodID methodID,
933 jvalue * args) {
934 return functions->CallByteMethodA(this,obj,methodID,args);
937 jchar CallCharMethod(jobject obj, jmethodID methodID, ...) {
938 va_list args;
939 jchar result;
940 va_start(args,methodID);
941 result = functions->CallCharMethodV(this,obj,methodID,args);
942 va_end(args);
943 return result;
945 jchar CallCharMethodV(jobject obj, jmethodID methodID,
946 va_list args) {
947 return functions->CallCharMethodV(this,obj,methodID,args);
949 jchar CallCharMethodA(jobject obj, jmethodID methodID,
950 jvalue * args) {
951 return functions->CallCharMethodA(this,obj,methodID,args);
954 jshort CallShortMethod(jobject obj, jmethodID methodID, ...) {
955 va_list args;
956 jshort result;
957 va_start(args,methodID);
958 result = functions->CallShortMethodV(this,obj,methodID,args);
959 va_end(args);
960 return result;
962 jshort CallShortMethodV(jobject obj, jmethodID methodID,
963 va_list args) {
964 return functions->CallShortMethodV(this,obj,methodID,args);
966 jshort CallShortMethodA(jobject obj, jmethodID methodID,
967 jvalue * args) {
968 return functions->CallShortMethodA(this,obj,methodID,args);
971 jint CallIntMethod(jobject obj, jmethodID methodID, ...) {
972 va_list args;
973 jint result;
974 va_start(args,methodID);
975 result = functions->CallIntMethodV(this,obj,methodID,args);
976 va_end(args);
977 return result;
979 jint CallIntMethodV(jobject obj, jmethodID methodID,
980 va_list args) {
981 return functions->CallIntMethodV(this,obj,methodID,args);
983 jint CallIntMethodA(jobject obj, jmethodID methodID,
984 jvalue * args) {
985 return functions->CallIntMethodA(this,obj,methodID,args);
988 jlong CallLongMethod(jobject obj, jmethodID methodID, ...) {
989 va_list args;
990 jlong result;
991 va_start(args,methodID);
992 result = functions->CallLongMethodV(this,obj,methodID,args);
993 va_end(args);
994 return result;
996 jlong CallLongMethodV(jobject obj, jmethodID methodID,
997 va_list args) {
998 return functions->CallLongMethodV(this,obj,methodID,args);
1000 jlong CallLongMethodA(jobject obj, jmethodID methodID,
1001 jvalue * args) {
1002 return functions->CallLongMethodA(this,obj,methodID,args);
1005 jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) {
1006 va_list args;
1007 jfloat result;
1008 va_start(args,methodID);
1009 result = functions->CallFloatMethodV(this,obj,methodID,args);
1010 va_end(args);
1011 return result;
1013 jfloat CallFloatMethodV(jobject obj, jmethodID methodID,
1014 va_list args) {
1015 return functions->CallFloatMethodV(this,obj,methodID,args);
1017 jfloat CallFloatMethodA(jobject obj, jmethodID methodID,
1018 jvalue * args) {
1019 return functions->CallFloatMethodA(this,obj,methodID,args);
1022 jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) {
1023 va_list args;
1024 jdouble result;
1025 va_start(args,methodID);
1026 result = functions->CallDoubleMethodV(this,obj,methodID,args);
1027 va_end(args);
1028 return result;
1030 jdouble CallDoubleMethodV(jobject obj, jmethodID methodID,
1031 va_list args) {
1032 return functions->CallDoubleMethodV(this,obj,methodID,args);
1034 jdouble CallDoubleMethodA(jobject obj, jmethodID methodID,
1035 jvalue * args) {
1036 return functions->CallDoubleMethodA(this,obj,methodID,args);
1039 void CallVoidMethod(jobject obj, jmethodID methodID, ...) {
1040 va_list args;
1041 va_start(args,methodID);
1042 functions->CallVoidMethodV(this,obj,methodID,args);
1043 va_end(args);
1045 void CallVoidMethodV(jobject obj, jmethodID methodID,
1046 va_list args) {
1047 functions->CallVoidMethodV(this,obj,methodID,args);
1049 void CallVoidMethodA(jobject obj, jmethodID methodID,
1050 jvalue * args) {
1051 functions->CallVoidMethodA(this,obj,methodID,args);
1054 jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz,
1055 jmethodID methodID, ...) {
1056 va_list args;
1057 jobject result;
1058 va_start(args,methodID);
1059 result = functions->CallNonvirtualObjectMethodV(this,obj,clazz,
1060 methodID,args);
1061 va_end(args);
1062 return result;
1064 jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz,
1065 jmethodID methodID, va_list args) {
1066 return functions->CallNonvirtualObjectMethodV(this,obj,clazz,
1067 methodID,args);
1069 jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz,
1070 jmethodID methodID, jvalue * args) {
1071 return functions->CallNonvirtualObjectMethodA(this,obj,clazz,
1072 methodID,args);
1075 jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz,
1076 jmethodID methodID, ...) {
1077 va_list args;
1078 jboolean result;
1079 va_start(args,methodID);
1080 result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
1081 methodID,args);
1082 va_end(args);
1083 return result;
1085 jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz,
1086 jmethodID methodID, va_list args) {
1087 return functions->CallNonvirtualBooleanMethodV(this,obj,clazz,
1088 methodID,args);
1090 jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz,
1091 jmethodID methodID, jvalue * args) {
1092 return functions->CallNonvirtualBooleanMethodA(this,obj,clazz,
1093 methodID, args);
1096 jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz,
1097 jmethodID methodID, ...) {
1098 va_list args;
1099 jbyte result;
1100 va_start(args,methodID);
1101 result = functions->CallNonvirtualByteMethodV(this,obj,clazz,
1102 methodID,args);
1103 va_end(args);
1104 return result;
1106 jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz,
1107 jmethodID methodID, va_list args) {
1108 return functions->CallNonvirtualByteMethodV(this,obj,clazz,
1109 methodID,args);
1111 jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz,
1112 jmethodID methodID, jvalue * args) {
1113 return functions->CallNonvirtualByteMethodA(this,obj,clazz,
1114 methodID,args);
1117 jchar CallNonvirtualCharMethod(jobject obj, jclass clazz,
1118 jmethodID methodID, ...) {
1119 va_list args;
1120 jchar result;
1121 va_start(args,methodID);
1122 result = functions->CallNonvirtualCharMethodV(this,obj,clazz,
1123 methodID,args);
1124 va_end(args);
1125 return result;
1127 jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz,
1128 jmethodID methodID, va_list args) {
1129 return functions->CallNonvirtualCharMethodV(this,obj,clazz,
1130 methodID,args);
1132 jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz,
1133 jmethodID methodID, jvalue * args) {
1134 return functions->CallNonvirtualCharMethodA(this,obj,clazz,
1135 methodID,args);
1138 jshort CallNonvirtualShortMethod(jobject obj, jclass clazz,
1139 jmethodID methodID, ...) {
1140 va_list args;
1141 jshort result;
1142 va_start(args,methodID);
1143 result = functions->CallNonvirtualShortMethodV(this,obj,clazz,
1144 methodID,args);
1145 va_end(args);
1146 return result;
1148 jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz,
1149 jmethodID methodID, va_list args) {
1150 return functions->CallNonvirtualShortMethodV(this,obj,clazz,
1151 methodID,args);
1153 jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz,
1154 jmethodID methodID, jvalue * args) {
1155 return functions->CallNonvirtualShortMethodA(this,obj,clazz,
1156 methodID,args);
1159 jint CallNonvirtualIntMethod(jobject obj, jclass clazz,
1160 jmethodID methodID, ...) {
1161 va_list args;
1162 jint result;
1163 va_start(args,methodID);
1164 result = functions->CallNonvirtualIntMethodV(this,obj,clazz,
1165 methodID,args);
1166 va_end(args);
1167 return result;
1169 jint CallNonvirtualIntMethodV(jobject obj, jclass clazz,
1170 jmethodID methodID, va_list args) {
1171 return functions->CallNonvirtualIntMethodV(this,obj,clazz,
1172 methodID,args);
1174 jint CallNonvirtualIntMethodA(jobject obj, jclass clazz,
1175 jmethodID methodID, jvalue * args) {
1176 return functions->CallNonvirtualIntMethodA(this,obj,clazz,
1177 methodID,args);
1180 jlong CallNonvirtualLongMethod(jobject obj, jclass clazz,
1181 jmethodID methodID, ...) {
1182 va_list args;
1183 jlong result;
1184 va_start(args,methodID);
1185 result = functions->CallNonvirtualLongMethodV(this,obj,clazz,
1186 methodID,args);
1187 va_end(args);
1188 return result;
1190 jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz,
1191 jmethodID methodID, va_list args) {
1192 return functions->CallNonvirtualLongMethodV(this,obj,clazz,
1193 methodID,args);
1195 jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz,
1196 jmethodID methodID, jvalue * args) {
1197 return functions->CallNonvirtualLongMethodA(this,obj,clazz,
1198 methodID,args);
1201 jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz,
1202 jmethodID methodID, ...) {
1203 va_list args;
1204 jfloat result;
1205 va_start(args,methodID);
1206 result = functions->CallNonvirtualFloatMethodV(this,obj,clazz,
1207 methodID,args);
1208 va_end(args);
1209 return result;
1211 jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz,
1212 jmethodID methodID,
1213 va_list args) {
1214 return functions->CallNonvirtualFloatMethodV(this,obj,clazz,
1215 methodID,args);
1217 jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz,
1218 jmethodID methodID,
1219 jvalue * args) {
1220 return functions->CallNonvirtualFloatMethodA(this,obj,clazz,
1221 methodID,args);
1224 jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz,
1225 jmethodID methodID, ...) {
1226 va_list args;
1227 jdouble result;
1228 va_start(args,methodID);
1229 result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
1230 methodID,args);
1231 va_end(args);
1232 return result;
1234 jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz,
1235 jmethodID methodID,
1236 va_list args) {
1237 return functions->CallNonvirtualDoubleMethodV(this,obj,clazz,
1238 methodID,args);
1240 jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz,
1241 jmethodID methodID,
1242 jvalue * args) {
1243 return functions->CallNonvirtualDoubleMethodA(this,obj,clazz,
1244 methodID,args);
1247 void CallNonvirtualVoidMethod(jobject obj, jclass clazz,
1248 jmethodID methodID, ...) {
1249 va_list args;
1250 va_start(args,methodID);
1251 functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
1252 va_end(args);
1254 void CallNonvirtualVoidMethodV(jobject obj, jclass clazz,
1255 jmethodID methodID,
1256 va_list args) {
1257 functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args);
1259 void CallNonvirtualVoidMethodA(jobject obj, jclass clazz,
1260 jmethodID methodID,
1261 jvalue * args) {
1262 functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args);
1265 jfieldID GetFieldID(jclass clazz, const char *name,
1266 const char *sig) {
1267 return functions->GetFieldID(this,clazz,name,sig);
1270 jobject GetObjectField(jobject obj, jfieldID fieldID) {
1271 return functions->GetObjectField(this,obj,fieldID);
1273 jboolean GetBooleanField(jobject obj, jfieldID fieldID) {
1274 return functions->GetBooleanField(this,obj,fieldID);
1276 jbyte GetByteField(jobject obj, jfieldID fieldID) {
1277 return functions->GetByteField(this,obj,fieldID);
1279 jchar GetCharField(jobject obj, jfieldID fieldID) {
1280 return functions->GetCharField(this,obj,fieldID);
1282 jshort GetShortField(jobject obj, jfieldID fieldID) {
1283 return functions->GetShortField(this,obj,fieldID);
1285 jint GetIntField(jobject obj, jfieldID fieldID) {
1286 return functions->GetIntField(this,obj,fieldID);
1288 jlong GetLongField(jobject obj, jfieldID fieldID) {
1289 return functions->GetLongField(this,obj,fieldID);
1291 jfloat GetFloatField(jobject obj, jfieldID fieldID) {
1292 return functions->GetFloatField(this,obj,fieldID);
1294 jdouble GetDoubleField(jobject obj, jfieldID fieldID) {
1295 return functions->GetDoubleField(this,obj,fieldID);
1298 void SetObjectField(jobject obj, jfieldID fieldID, jobject val) {
1299 functions->SetObjectField(this,obj,fieldID,val);
1301 void SetBooleanField(jobject obj, jfieldID fieldID,
1302 jboolean val) {
1303 functions->SetBooleanField(this,obj,fieldID,val);
1305 void SetByteField(jobject obj, jfieldID fieldID,
1306 jbyte val) {
1307 functions->SetByteField(this,obj,fieldID,val);
1309 void SetCharField(jobject obj, jfieldID fieldID,
1310 jchar val) {
1311 functions->SetCharField(this,obj,fieldID,val);
1313 void SetShortField(jobject obj, jfieldID fieldID,
1314 jshort val) {
1315 functions->SetShortField(this,obj,fieldID,val);
1317 void SetIntField(jobject obj, jfieldID fieldID,
1318 jint val) {
1319 functions->SetIntField(this,obj,fieldID,val);
1321 void SetLongField(jobject obj, jfieldID fieldID,
1322 jlong val) {
1323 functions->SetLongField(this,obj,fieldID,val);
1325 void SetFloatField(jobject obj, jfieldID fieldID,
1326 jfloat val) {
1327 functions->SetFloatField(this,obj,fieldID,val);
1329 void SetDoubleField(jobject obj, jfieldID fieldID,
1330 jdouble val) {
1331 functions->SetDoubleField(this,obj,fieldID,val);
1334 jmethodID GetStaticMethodID(jclass clazz, const char *name,
1335 const char *sig) {
1336 return functions->GetStaticMethodID(this,clazz,name,sig);
1339 jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID,
1340 ...) {
1341 va_list args;
1342 jobject result;
1343 va_start(args,methodID);
1344 result = functions->CallStaticObjectMethodV(this,clazz,methodID,args);
1345 va_end(args);
1346 return result;
1348 jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID,
1349 va_list args) {
1350 return functions->CallStaticObjectMethodV(this,clazz,methodID,args);
1352 jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID,
1353 jvalue *args) {
1354 return functions->CallStaticObjectMethodA(this,clazz,methodID,args);
1357 jboolean CallStaticBooleanMethod(jclass clazz,
1358 jmethodID methodID, ...) {
1359 va_list args;
1360 jboolean result;
1361 va_start(args,methodID);
1362 result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
1363 va_end(args);
1364 return result;
1366 jboolean CallStaticBooleanMethodV(jclass clazz,
1367 jmethodID methodID, va_list args) {
1368 return functions->CallStaticBooleanMethodV(this,clazz,methodID,args);
1370 jboolean CallStaticBooleanMethodA(jclass clazz,
1371 jmethodID methodID, jvalue *args) {
1372 return functions->CallStaticBooleanMethodA(this,clazz,methodID,args);
1375 jbyte CallStaticByteMethod(jclass clazz,
1376 jmethodID methodID, ...) {
1377 va_list args;
1378 jbyte result;
1379 va_start(args,methodID);
1380 result = functions->CallStaticByteMethodV(this,clazz,methodID,args);
1381 va_end(args);
1382 return result;
1384 jbyte CallStaticByteMethodV(jclass clazz,
1385 jmethodID methodID, va_list args) {
1386 return functions->CallStaticByteMethodV(this,clazz,methodID,args);
1388 jbyte CallStaticByteMethodA(jclass clazz,
1389 jmethodID methodID, jvalue *args) {
1390 return functions->CallStaticByteMethodA(this,clazz,methodID,args);
1393 jchar CallStaticCharMethod(jclass clazz,
1394 jmethodID methodID, ...) {
1395 va_list args;
1396 jchar result;
1397 va_start(args,methodID);
1398 result = functions->CallStaticCharMethodV(this,clazz,methodID,args);
1399 va_end(args);
1400 return result;
1402 jchar CallStaticCharMethodV(jclass clazz,
1403 jmethodID methodID, va_list args) {
1404 return functions->CallStaticCharMethodV(this,clazz,methodID,args);
1406 jchar CallStaticCharMethodA(jclass clazz,
1407 jmethodID methodID, jvalue *args) {
1408 return functions->CallStaticCharMethodA(this,clazz,methodID,args);
1411 jshort CallStaticShortMethod(jclass clazz,
1412 jmethodID methodID, ...) {
1413 va_list args;
1414 jshort result;
1415 va_start(args,methodID);
1416 result = functions->CallStaticShortMethodV(this,clazz,methodID,args);
1417 va_end(args);
1418 return result;
1420 jshort CallStaticShortMethodV(jclass clazz,
1421 jmethodID methodID, va_list args) {
1422 return functions->CallStaticShortMethodV(this,clazz,methodID,args);
1424 jshort CallStaticShortMethodA(jclass clazz,
1425 jmethodID methodID, jvalue *args) {
1426 return functions->CallStaticShortMethodA(this,clazz,methodID,args);
1429 jint CallStaticIntMethod(jclass clazz,
1430 jmethodID methodID, ...) {
1431 va_list args;
1432 jint result;
1433 va_start(args,methodID);
1434 result = functions->CallStaticIntMethodV(this,clazz,methodID,args);
1435 va_end(args);
1436 return result;
1438 jint CallStaticIntMethodV(jclass clazz,
1439 jmethodID methodID, va_list args) {
1440 return functions->CallStaticIntMethodV(this,clazz,methodID,args);
1442 jint CallStaticIntMethodA(jclass clazz,
1443 jmethodID methodID, jvalue *args) {
1444 return functions->CallStaticIntMethodA(this,clazz,methodID,args);
1447 jlong CallStaticLongMethod(jclass clazz,
1448 jmethodID methodID, ...) {
1449 va_list args;
1450 jlong result;
1451 va_start(args,methodID);
1452 result = functions->CallStaticLongMethodV(this,clazz,methodID,args);
1453 va_end(args);
1454 return result;
1456 jlong CallStaticLongMethodV(jclass clazz,
1457 jmethodID methodID, va_list args) {
1458 return functions->CallStaticLongMethodV(this,clazz,methodID,args);
1460 jlong CallStaticLongMethodA(jclass clazz,
1461 jmethodID methodID, jvalue *args) {
1462 return functions->CallStaticLongMethodA(this,clazz,methodID,args);
1465 jfloat CallStaticFloatMethod(jclass clazz,
1466 jmethodID methodID, ...) {
1467 va_list args;
1468 jfloat result;
1469 va_start(args,methodID);
1470 result = functions->CallStaticFloatMethodV(this,clazz,methodID,args);
1471 va_end(args);
1472 return result;
1474 jfloat CallStaticFloatMethodV(jclass clazz,
1475 jmethodID methodID, va_list args) {
1476 return functions->CallStaticFloatMethodV(this,clazz,methodID,args);
1478 jfloat CallStaticFloatMethodA(jclass clazz,
1479 jmethodID methodID, jvalue *args) {
1480 return functions->CallStaticFloatMethodA(this,clazz,methodID,args);
1483 jdouble CallStaticDoubleMethod(jclass clazz,
1484 jmethodID methodID, ...) {
1485 va_list args;
1486 jdouble result;
1487 va_start(args,methodID);
1488 result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
1489 va_end(args);
1490 return result;
1492 jdouble CallStaticDoubleMethodV(jclass clazz,
1493 jmethodID methodID, va_list args) {
1494 return functions->CallStaticDoubleMethodV(this,clazz,methodID,args);
1496 jdouble CallStaticDoubleMethodA(jclass clazz,
1497 jmethodID methodID, jvalue *args) {
1498 return functions->CallStaticDoubleMethodA(this,clazz,methodID,args);
1501 void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) {
1502 va_list args;
1503 va_start(args,methodID);
1504 functions->CallStaticVoidMethodV(this,cls,methodID,args);
1505 va_end(args);
1507 void CallStaticVoidMethodV(jclass cls, jmethodID methodID,
1508 va_list args) {
1509 functions->CallStaticVoidMethodV(this,cls,methodID,args);
1511 void CallStaticVoidMethodA(jclass cls, jmethodID methodID,
1512 jvalue * args) {
1513 functions->CallStaticVoidMethodA(this,cls,methodID,args);
1516 jfieldID GetStaticFieldID(jclass clazz, const char *name,
1517 const char *sig) {
1518 return functions->GetStaticFieldID(this,clazz,name,sig);
1520 jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) {
1521 return functions->GetStaticObjectField(this,clazz,fieldID);
1523 jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) {
1524 return functions->GetStaticBooleanField(this,clazz,fieldID);
1526 jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) {
1527 return functions->GetStaticByteField(this,clazz,fieldID);
1529 jchar GetStaticCharField(jclass clazz, jfieldID fieldID) {
1530 return functions->GetStaticCharField(this,clazz,fieldID);
1532 jshort GetStaticShortField(jclass clazz, jfieldID fieldID) {
1533 return functions->GetStaticShortField(this,clazz,fieldID);
1535 jint GetStaticIntField(jclass clazz, jfieldID fieldID) {
1536 return functions->GetStaticIntField(this,clazz,fieldID);
1538 jlong GetStaticLongField(jclass clazz, jfieldID fieldID) {
1539 return functions->GetStaticLongField(this,clazz,fieldID);
1541 jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) {
1542 return functions->GetStaticFloatField(this,clazz,fieldID);
1544 jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) {
1545 return functions->GetStaticDoubleField(this,clazz,fieldID);
1548 void SetStaticObjectField(jclass clazz, jfieldID fieldID,
1549 jobject value) {
1550 functions->SetStaticObjectField(this,clazz,fieldID,value);
1552 void SetStaticBooleanField(jclass clazz, jfieldID fieldID,
1553 jboolean value) {
1554 functions->SetStaticBooleanField(this,clazz,fieldID,value);
1556 void SetStaticByteField(jclass clazz, jfieldID fieldID,
1557 jbyte value) {
1558 functions->SetStaticByteField(this,clazz,fieldID,value);
1560 void SetStaticCharField(jclass clazz, jfieldID fieldID,
1561 jchar value) {
1562 functions->SetStaticCharField(this,clazz,fieldID,value);
1564 void SetStaticShortField(jclass clazz, jfieldID fieldID,
1565 jshort value) {
1566 functions->SetStaticShortField(this,clazz,fieldID,value);
1568 void SetStaticIntField(jclass clazz, jfieldID fieldID,
1569 jint value) {
1570 functions->SetStaticIntField(this,clazz,fieldID,value);
1572 void SetStaticLongField(jclass clazz, jfieldID fieldID,
1573 jlong value) {
1574 functions->SetStaticLongField(this,clazz,fieldID,value);
1576 void SetStaticFloatField(jclass clazz, jfieldID fieldID,
1577 jfloat value) {
1578 functions->SetStaticFloatField(this,clazz,fieldID,value);
1580 void SetStaticDoubleField(jclass clazz, jfieldID fieldID,
1581 jdouble value) {
1582 functions->SetStaticDoubleField(this,clazz,fieldID,value);
1585 jstring NewString(const jchar *unicode, jsize len) {
1586 return functions->NewString(this,unicode,len);
1588 jsize GetStringLength(jstring str) {
1589 return functions->GetStringLength(this,str);
1591 const jchar *GetStringChars(jstring str, jboolean *isCopy) {
1592 return functions->GetStringChars(this,str,isCopy);
1594 void ReleaseStringChars(jstring str, const jchar *chars) {
1595 functions->ReleaseStringChars(this,str,chars);
1598 jstring NewStringUTF(const char *utf) {
1599 return functions->NewStringUTF(this,utf);
1601 jsize GetStringUTFLength(jstring str) {
1602 return functions->GetStringUTFLength(this,str);
1604 const char* GetStringUTFChars(jstring str, jboolean *isCopy) {
1605 return functions->GetStringUTFChars(this,str,isCopy);
1607 void ReleaseStringUTFChars(jstring str, const char* chars) {
1608 functions->ReleaseStringUTFChars(this,str,chars);
1611 jsize GetArrayLength(jarray array) {
1612 return functions->GetArrayLength(this,array);
1615 jobjectArray NewObjectArray(jsize len, jclass clazz,
1616 jobject init) {
1617 return functions->NewObjectArray(this,len,clazz,init);
1619 jobject GetObjectArrayElement(jobjectArray array, jsize index) {
1620 return functions->GetObjectArrayElement(this,array,index);
1622 void SetObjectArrayElement(jobjectArray array, jsize index,
1623 jobject val) {
1624 functions->SetObjectArrayElement(this,array,index,val);
1627 jbooleanArray NewBooleanArray(jsize len) {
1628 return functions->NewBooleanArray(this,len);
1630 jbyteArray NewByteArray(jsize len) {
1631 return functions->NewByteArray(this,len);
1633 jcharArray NewCharArray(jsize len) {
1634 return functions->NewCharArray(this,len);
1636 jshortArray NewShortArray(jsize len) {
1637 return functions->NewShortArray(this,len);
1639 jintArray NewIntArray(jsize len) {
1640 return functions->NewIntArray(this,len);
1642 jlongArray NewLongArray(jsize len) {
1643 return functions->NewLongArray(this,len);
1645 jfloatArray NewFloatArray(jsize len) {
1646 return functions->NewFloatArray(this,len);
1648 jdoubleArray NewDoubleArray(jsize len) {
1649 return functions->NewDoubleArray(this,len);
1652 jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) {
1653 return functions->GetBooleanArrayElements(this,array,isCopy);
1655 jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) {
1656 return functions->GetByteArrayElements(this,array,isCopy);
1658 jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) {
1659 return functions->GetCharArrayElements(this,array,isCopy);
1661 jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) {
1662 return functions->GetShortArrayElements(this,array,isCopy);
1664 jint * GetIntArrayElements(jintArray array, jboolean *isCopy) {
1665 return functions->GetIntArrayElements(this,array,isCopy);
1667 jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) {
1668 return functions->GetLongArrayElements(this,array,isCopy);
1670 jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) {
1671 return functions->GetFloatArrayElements(this,array,isCopy);
1673 jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) {
1674 return functions->GetDoubleArrayElements(this,array,isCopy);
1677 void ReleaseBooleanArrayElements(jbooleanArray array,
1678 jboolean *elems,
1679 jint mode) {
1680 functions->ReleaseBooleanArrayElements(this,array,elems,mode);
1682 void ReleaseByteArrayElements(jbyteArray array,
1683 jbyte *elems,
1684 jint mode) {
1685 functions->ReleaseByteArrayElements(this,array,elems,mode);
1687 void ReleaseCharArrayElements(jcharArray array,
1688 jchar *elems,
1689 jint mode) {
1690 functions->ReleaseCharArrayElements(this,array,elems,mode);
1692 void ReleaseShortArrayElements(jshortArray array,
1693 jshort *elems,
1694 jint mode) {
1695 functions->ReleaseShortArrayElements(this,array,elems,mode);
1697 void ReleaseIntArrayElements(jintArray array,
1698 jint *elems,
1699 jint mode) {
1700 functions->ReleaseIntArrayElements(this,array,elems,mode);
1702 void ReleaseLongArrayElements(jlongArray array,
1703 jlong *elems,
1704 jint mode) {
1705 functions->ReleaseLongArrayElements(this,array,elems,mode);
1707 void ReleaseFloatArrayElements(jfloatArray array,
1708 jfloat *elems,
1709 jint mode) {
1710 functions->ReleaseFloatArrayElements(this,array,elems,mode);
1712 void ReleaseDoubleArrayElements(jdoubleArray array,
1713 jdouble *elems,
1714 jint mode) {
1715 functions->ReleaseDoubleArrayElements(this,array,elems,mode);
1718 void GetBooleanArrayRegion(jbooleanArray array,
1719 jsize start, jsize len, jboolean *buf) {
1720 functions->GetBooleanArrayRegion(this,array,start,len,buf);
1722 void GetByteArrayRegion(jbyteArray array,
1723 jsize start, jsize len, jbyte *buf) {
1724 functions->GetByteArrayRegion(this,array,start,len,buf);
1726 void GetCharArrayRegion(jcharArray array,
1727 jsize start, jsize len, jchar *buf) {
1728 functions->GetCharArrayRegion(this,array,start,len,buf);
1730 void GetShortArrayRegion(jshortArray array,
1731 jsize start, jsize len, jshort *buf) {
1732 functions->GetShortArrayRegion(this,array,start,len,buf);
1734 void GetIntArrayRegion(jintArray array,
1735 jsize start, jsize len, jint *buf) {
1736 functions->GetIntArrayRegion(this,array,start,len,buf);
1738 void GetLongArrayRegion(jlongArray array,
1739 jsize start, jsize len, jlong *buf) {
1740 functions->GetLongArrayRegion(this,array,start,len,buf);
1742 void GetFloatArrayRegion(jfloatArray array,
1743 jsize start, jsize len, jfloat *buf) {
1744 functions->GetFloatArrayRegion(this,array,start,len,buf);
1746 void GetDoubleArrayRegion(jdoubleArray array,
1747 jsize start, jsize len, jdouble *buf) {
1748 functions->GetDoubleArrayRegion(this,array,start,len,buf);
1751 void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len,
1752 jboolean *buf) {
1753 functions->SetBooleanArrayRegion(this,array,start,len,buf);
1755 void SetByteArrayRegion(jbyteArray array, jsize start, jsize len,
1756 jbyte *buf) {
1757 functions->SetByteArrayRegion(this,array,start,len,buf);
1759 void SetCharArrayRegion(jcharArray array, jsize start, jsize len,
1760 jchar *buf) {
1761 functions->SetCharArrayRegion(this,array,start,len,buf);
1763 void SetShortArrayRegion(jshortArray array, jsize start, jsize len,
1764 jshort *buf) {
1765 functions->SetShortArrayRegion(this,array,start,len,buf);
1767 void SetIntArrayRegion(jintArray array, jsize start, jsize len,
1768 jint *buf) {
1769 functions->SetIntArrayRegion(this,array,start,len,buf);
1771 void SetLongArrayRegion(jlongArray array, jsize start, jsize len,
1772 jlong *buf) {
1773 functions->SetLongArrayRegion(this,array,start,len,buf);
1775 void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len,
1776 jfloat *buf) {
1777 functions->SetFloatArrayRegion(this,array,start,len,buf);
1779 void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len,
1780 jdouble *buf) {
1781 functions->SetDoubleArrayRegion(this,array,start,len,buf);
1784 jint RegisterNatives(jclass clazz, const JNINativeMethod *methods,
1785 jint nMethods) {
1786 return functions->RegisterNatives(this,clazz,methods,nMethods);
1788 jint UnregisterNatives(jclass clazz) {
1789 return functions->UnregisterNatives(this,clazz);
1792 jint MonitorEnter(jobject obj) {
1793 return functions->MonitorEnter(this,obj);
1795 jint MonitorExit(jobject obj) {
1796 return functions->MonitorExit(this,obj);
1799 jint GetJavaVM(JavaVM **vm) {
1800 return functions->GetJavaVM(this,vm);
1803 void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) {
1804 functions->GetStringRegion(this,str,start,len,buf);
1806 void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) {
1807 functions->GetStringUTFRegion(this,str,start,len,buf);
1810 void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) {
1811 return functions->GetPrimitiveArrayCritical(this,array,isCopy);
1813 void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) {
1814 functions->ReleasePrimitiveArrayCritical(this,array,carray,mode);
1817 const jchar * GetStringCritical(jstring string, jboolean *isCopy) {
1818 return functions->GetStringCritical(this,string,isCopy);
1820 void ReleaseStringCritical(jstring string, const jchar *cstring) {
1821 functions->ReleaseStringCritical(this,string,cstring);
1824 jweak NewWeakGlobalRef(jobject obj) {
1825 return functions->NewWeakGlobalRef(this,obj);
1827 void DeleteWeakGlobalRef(jweak ref) {
1828 functions->DeleteWeakGlobalRef(this,ref);
1831 jboolean ExceptionCheck() {
1832 return functions->ExceptionCheck(this);
1835 jobject NewDirectByteBuffer(void* address, jlong capacity) {
1836 return functions->NewDirectByteBuffer(this, address, capacity);
1838 void* GetDirectBufferAddress(jobject buf) {
1839 return functions->GetDirectBufferAddress(this, buf);
1841 jlong GetDirectBufferCapacity(jobject buf) {
1842 return functions->GetDirectBufferCapacity(this, buf);
1845 #endif /* __cplusplus */
1848 typedef struct JavaVMOption {
1849 char *optionString;
1850 void *extraInfo;
1851 } JavaVMOption;
1853 typedef struct JavaVMInitArgs {
1854 jint version;
1856 jint nOptions;
1857 JavaVMOption *options;
1858 jboolean ignoreUnrecognized;
1859 } JavaVMInitArgs;
1861 typedef struct JavaVMAttachArgs {
1862 jint version;
1864 char *name;
1865 jobject group;
1866 } JavaVMAttachArgs;
1868 /* These structures will be VM-specific. */
1870 typedef struct JDK1_1InitArgs {
1871 jint version;
1873 char **properties;
1874 jint checkSource;
1875 jint nativeStackSize;
1876 jint javaStackSize;
1877 jint minHeapSize;
1878 jint maxHeapSize;
1879 jint verifyMode;
1880 char *classpath;
1882 jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args);
1883 void (JNICALL *exit)(jint code);
1884 void (JNICALL *abort)(void);
1886 jint enableClassGC;
1887 jint enableVerboseGC;
1888 jint disableAsyncGC;
1889 jint verbose;
1890 jboolean debugging;
1891 jint debugPort;
1892 } JDK1_1InitArgs;
1894 typedef struct JDK1_1AttachArgs {
1895 void * __padding; /* C compilers don't allow empty structures. */
1896 } JDK1_1AttachArgs;
1898 #define JDK1_2
1899 #define JDK1_4
1901 /* End VM-specific. */
1903 struct JNIInvokeInterface_ {
1904 void *reserved0;
1905 void *reserved1;
1906 void *reserved2;
1908 jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
1910 jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
1912 jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
1914 jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version);
1916 jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
1919 struct JavaVM_ {
1920 const struct JNIInvokeInterface_ *functions;
1921 #ifdef __cplusplus
1923 jint DestroyJavaVM() {
1924 return functions->DestroyJavaVM(this);
1926 jint AttachCurrentThread(void **penv, void *args) {
1927 return functions->AttachCurrentThread(this, penv, args);
1929 jint DetachCurrentThread() {
1930 return functions->DetachCurrentThread(this);
1933 jint GetEnv(void **penv, jint version) {
1934 return functions->GetEnv(this, penv, version);
1936 jint AttachCurrentThreadAsDaemon(void **penv, void *args) {
1937 return functions->AttachCurrentThreadAsDaemon(this, penv, args);
1939 #endif
1942 #ifdef _JNI_IMPLEMENTATION_
1943 #define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
1944 #else
1945 #define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
1946 #endif
1947 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
1948 JNI_GetDefaultJavaVMInitArgs(void *args);
1950 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
1951 JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
1953 _JNI_IMPORT_OR_EXPORT_ jint JNICALL
1954 JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
1956 /* Defined by native libraries. */
1957 JNIEXPORT jint JNICALL
1958 JNI_OnLoad(JavaVM *vm, void *reserved);
1960 JNIEXPORT void JNICALL
1961 JNI_OnUnload(JavaVM *vm, void *reserved);
1963 #define JNI_VERSION_1_1 0x00010001
1964 #define JNI_VERSION_1_2 0x00010002
1965 #define JNI_VERSION_1_4 0x00010004
1967 #ifdef __cplusplus
1968 } /* extern "C" */
1969 #endif /* __cplusplus */
1971 #endif /* JNI_H */